import {
    INIT_ORDER
} from './mutations-types.js'

export default{
    state:{
        list:[],
        orderId: localStorage.getItem('order_id') || '',
    },
    mutations:{
        [INIT_ORDER]( state , arr ){
            state.list = arr;
            state.orderId = arr[0].order_id
            //持久化存储订单号
            localStorage.setItem('order_id',arr[0].order_id);
        }
    }
}